<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Document</title>
  <style>
    .active {
      color: red;
    }
    
    .line {
      font-size: 50px;
    }
    
    .title {
      font-weight: 700;
    }
  </style>
</head>

<body>
  <div id="app">
    <div :class="{'active':isActive,'line':isLine}" class="title">
      {{message}}
    </div>
    <div :class="classes">{{message}}</div>
    <div :class="getClasses()">{{message}}</div>
  </div>
  <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
  <script>
    const app = new Vue({
      el: "#app",
      data: {
        message: "hello",
        isActive: true,
        isLine: true,
      },
      computed: {
        classes() {
          return {
            active: this.isActive,
            line: this.isLine,
            title: true,
          };
        },
      },
      methods: {
        getClasses() {
          return {
            active: this.isActive,
            line: this.isLine,
            title: true,
          };
        },
      },
    });
  </script>
</body>

</html>